home *** CD-ROM | disk | FTP | other *** search
- package javax.swing;
-
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Cursor;
- import java.awt.Dimension;
- import java.awt.Font;
- import java.awt.FontMetrics;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.event.FocusListener;
- import java.io.Serializable;
- import java.util.Locale;
- import javax.accessibility.Accessible;
- import javax.accessibility.AccessibleComponent;
- import javax.accessibility.AccessibleContext;
- import javax.accessibility.AccessibleRole;
- import javax.accessibility.AccessibleState;
- import javax.accessibility.AccessibleStateSet;
-
- class JTabbedPane$Page extends AccessibleContext implements Serializable, Accessible, AccessibleComponent {
- // $FF: synthetic field
- private final JTabbedPane this$0;
- String title;
- Color background;
- Color foreground;
- Icon icon;
- Icon disabledIcon;
- JTabbedPane parent;
- Component component;
- String tip;
- boolean enabled;
- boolean needsUIUpdate;
-
- JTabbedPane$Page(JTabbedPane var1, JTabbedPane var2, String var3, Icon var4, Icon var5, Component var6, String var7) {
- this.this$0 = var1;
- this.enabled = true;
- this.title = var3;
- this.icon = var4;
- this.disabledIcon = var5;
- this.parent = var2;
- ((AccessibleContext)this).setAccessibleParent(var2);
- this.component = var6;
- this.tip = var7;
- if (var6 instanceof Accessible) {
- AccessibleContext var8 = ((Accessible)var6).getAccessibleContext();
- if (var8 != null) {
- var8.setAccessibleParent(this);
- }
- }
-
- }
-
- public void addFocusListener(FocusListener var1) {
- }
-
- public boolean contains(Point var1) {
- Rectangle var2 = this.getBounds();
- return var2.contains(var1);
- }
-
- public Accessible getAccessibleAt(Point var1) {
- return this.component instanceof Accessible ? (Accessible)this.component : null;
- }
-
- public Accessible getAccessibleChild(int var1) {
- return this.component instanceof Accessible ? (Accessible)this.component : null;
- }
-
- public int getAccessibleChildrenCount() {
- return this.component instanceof Accessible ? 1 : 0;
- }
-
- public AccessibleComponent getAccessibleComponent() {
- return this;
- }
-
- public AccessibleContext getAccessibleContext() {
- return this;
- }
-
- public String getAccessibleDescription() {
- if (super.accessibleDescription != null) {
- return super.accessibleDescription;
- } else {
- return this.tip != null ? this.tip : null;
- }
- }
-
- public int getAccessibleIndexInParent() {
- return this.parent.indexOfTab(this.title);
- }
-
- public String getAccessibleName() {
- if (super.accessibleName != null) {
- return super.accessibleName;
- } else {
- return this.title != null ? this.title : null;
- }
- }
-
- public AccessibleRole getAccessibleRole() {
- return AccessibleRole.PAGE_TAB;
- }
-
- public AccessibleStateSet getAccessibleStateSet() {
- AccessibleStateSet var1 = this.parent.getAccessibleContext().getAccessibleStateSet();
- var1.add(AccessibleState.SELECTABLE);
- int var2 = this.parent.indexOfTab(this.title);
- if (var2 == this.parent.getSelectedIndex()) {
- var1.add(AccessibleState.SELECTED);
- }
-
- return var1;
- }
-
- public Color getBackground() {
- return this.background != null ? this.background : this.parent.getBackground();
- }
-
- public Rectangle getBounds() {
- return this.parent.getUI().getTabBounds(this.parent, this.parent.indexOfTab(this.title));
- }
-
- public Cursor getCursor() {
- return this.parent.getCursor();
- }
-
- public Font getFont() {
- return this.parent.getFont();
- }
-
- public FontMetrics getFontMetrics(Font var1) {
- return this.parent.getFontMetrics(var1);
- }
-
- public Color getForeground() {
- return this.foreground != null ? this.foreground : this.parent.getForeground();
- }
-
- public Locale getLocale() {
- return this.parent.getLocale();
- }
-
- public Point getLocation() {
- Rectangle var1 = this.getBounds();
- return new Point(var1.x, var1.y);
- }
-
- public Point getLocationOnScreen() {
- Point var1 = this.parent.getLocationOnScreen();
- Point var2 = this.getLocation();
- var2.translate(var1.x, var1.y);
- return var2;
- }
-
- public Dimension getSize() {
- Rectangle var1 = this.getBounds();
- return new Dimension(var1.width, var1.height);
- }
-
- public boolean isEnabled() {
- return this.enabled;
- }
-
- public boolean isFocusTraversable() {
- return false;
- }
-
- public boolean isShowing() {
- return this.parent.isShowing();
- }
-
- public boolean isVisible() {
- return this.parent.isVisible();
- }
-
- public void removeFocusListener(FocusListener var1) {
- }
-
- public void requestFocus() {
- }
-
- public void setBackground(Color var1) {
- this.background = var1;
- }
-
- public void setBounds(Rectangle var1) {
- }
-
- public void setCursor(Cursor var1) {
- this.parent.setCursor(var1);
- }
-
- public void setEnabled(boolean var1) {
- this.enabled = var1;
- }
-
- public void setFont(Font var1) {
- this.parent.setFont(var1);
- }
-
- public void setForeground(Color var1) {
- this.foreground = var1;
- }
-
- public void setLocation(Point var1) {
- }
-
- public void setSize(Dimension var1) {
- }
-
- public void setVisible(boolean var1) {
- this.parent.setVisible(var1);
- }
- }
-